<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit">
  	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  	<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<title>${SYSTEM_NAME}</title>
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/layui/css/layui.css?v=${FILE_VERSION}" media="all">
	<link rel="stylesheet" href="${pageContext.request.contextPath}/static/layuiadmin/style/admin.css?v=${FILE_VERSION}" media="all">
</head>
<body>
<div class="layui-fluid">
	<div class="layui-card">
		<div class="layui-card-body" style="padding: 15px;">
		<form class="layui-form" method="post" id="basicform" >
			<input id="id" name="id" value="${generatorConfigure.id }" type="hidden">
			
			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label layui-form-required">作者名称</label>
				<div class="layui-input-block">
					<input name="authorName" placeholder="请输入作者名称"
						class="layui-input" lay-verify="required" value="${generatorConfigure.authorName }" maxlength="100">
				</div>
			</div>

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label layui-form-required">包名路径</label>
				<div class="layui-input-block">
					<input name="packageName" placeholder="请输入包名路径"
						   class="layui-input" lay-verify="required" value="${generatorConfigure.packageName }" maxlength="100">
				</div>
			</div>

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label layui-form-required">工程名称</label>
				<div class="layui-input-block">
					<textarea name="projectName" placeholder="工程名称"
							  class="layui-textarea" >${generatorConfigure.projectName}</textarea>
				</div>
			</div>

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label layui-form-required">tinyint转换类型</label>
				<div class="layui-input-inline">
					<select  lay-verify="required" name="tinyintTransType">
						<c:forEach items="${tinyintTransTypeMap}" var="t">
							<option value="${t.key }" <c:if test="${t.key eq generatorConfigure.tinyintTransType}">selected="selected"</c:if>>${t.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label layui-form-required">命名转换规则</label>
				<div class="layui-input-inline">
					<select lay-verify="required" name="nameCaseType">
						<c:forEach items="${nameCaseTypeMap}" var="t">
							<option value="${t.key }" <c:if test="${t.key eq generatorConfigure.nameCaseType}">selected="selected"</c:if>>${t.value }</option>
						</c:forEach>
					</select>
				</div>
			</div>

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label layui-form-required">系统表</label>
				<div class="layui-input-block">
					<textarea name="systemTable" placeholder="系统表不作为统计，以，号隔开"
							  class="layui-textarea" >${generatorConfigure.systemTable}</textarea>
				</div>
			</div>

			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn layui-btn-primary layui-border-blue" lay-submit="" lay-filter="sub">立即提交</button>
					<button type="reset" class="layui-btn layui-btn-primary layui-border-blue">重置</button>
				</div>
			</div>
		</form>
	</div>
	</div>
</div>
<script src="${pageContext.request.contextPath}/static/js/common-2.0.0.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/layuiadmin/layui/layui.js?v=${FILE_VERSION}"></script>
<script src="${pageContext.request.contextPath}/static/js/jquery-3.3.1.min.js?v=${FILE_VERSION}"></script>

	<script>
		layui.use(['form', 'element','layer'], function() {
			var form = layui.form;

			form.on('submit(sub)', function(data){
				$ajax({
					url: "/generator/configure/edit/save",
					data :  data.field,
			        succCallback: function (json) {
			        }
				});
				return false; //阻止表单跳转。如果需要表单跳转，去掉这段即可。
			});
		});

	</script>
</body>
</html>